 <table width="100%" border="0" cellspacing="0" cellpadding="0">
 <tr><td id="giohangcaption" colspan="2">GIỎ HÀNG</td></tr>
 <tr>

 <td class="tongket">SỐ LƯỢNG</td> 
  <?php if (isset($_SESSION['daySoluong']))
 	 while( key($_SESSION['daySoluong'])!= null){
		$idSP=key($_SESSION['daySoluong']);
		$tensp=current($_SESSION['dayTenSP']);
		$soluong=current($_SESSION['daySoluong']);
		$dongia=current($_SESSION['dayDongia']);
		$tongsoluong+=$soluong;			
		$tien=$dongia*$soluong;
		$tongtien+=$tien;	
 ?>
 <td class="tongket">
 <form onsubmit="return false;" action="" method=get name="formUpdate" class="form" id="formUpdate">
 <input name="idSP" type="hidden" value="<?php echo $idSP;?>" />
 <input name="soluong" size="2" id="soluong" value="<?php echo $soluong;?>" />
 <img src="images/refresh.gif" name="refresh" id="refresh" onclick="chonSP('chonsp.php?idSP='
 +this.parentNode.idSP.value+ '&soluong='+this.parentNode.soluong.value+'&update=1')" />
 <a href=# onclick="chonSP('chonsp.php?del_1=1&idSP='+ this.parentNode.idSP.value)">X</a>
 </form> 
 </td>
 

 </tr>
 
 <?php 	next($_SESSION['daySoluong']);
		next($_SESSION['dayDongia']);
		next($_SESSION['dayTenSP']);		
 ?>
 <?php } ?>
 <tr>
 <td class="tongket">TỔNG TIỀN</td>
 <td class="tongket"><?php echo number_format($tongtien)?>&nbsp;</td>

 </tr>

 <tr>
 <td colspan="3" align="center" class="tongket">   <a href="muahang.php"><img src="images/muahang1.gif" border="0" /></a> <a onclick="chonSP('chonsp.php?del_All=1');" href="#">Xóa</a></td>
 </tr>
 
 </table>
 

